home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GZIP107S.ZIP;1 / GZIP107.TAR / gzip-1.0.7 / gzip-tar.patch < prev    next >
Encoding:
Text File  |  1993-02-24  |  3.8 KB  |  125 lines

  1. This is a *NON official* patch to GNU tar 1.11.1 to support gzip. With
  2. this patch, tar -cz invokes gzip, tar -cZ invokes compress. You can
  3. use tar -xz to extract both compressed and gzip'ed tar files.
  4. For example you can transfer files from one machine to another
  5. in a compressed form using:
  6.  
  7.   tar cfz - files | rsh machine 'tar xvpfz -'
  8.  
  9. tar and gzip are available on all GNU archive sites, such as
  10. prep.ai.mit.edu:/pub/gnu and its mirrors.
  11.  
  12. Jean-loup Gailly
  13. jloup@chorus.fr
  14.  
  15. diff -c bak/buffer.c ./buffer.c
  16. *** bak/buffer.c    Mon Sep 14 22:56:39 1992
  17. --- ./buffer.c    Mon Dec 28 19:07:52 1992
  18. ***************
  19. *** 452,459 ****
  20.           }
  21.       }
  22.           /* So we should exec compress (-d) */
  23. !     if(ar_reading)
  24.           execlp("compress", "compress", "-d", (char *)0);
  25.       else
  26.           execlp("compress", "compress", (char *)0);
  27.       msg_perror("can't exec compress");
  28. --- 452,463 ----
  29.           }
  30.       }
  31.           /* So we should exec compress (-d) */
  32. !     if(ar_reading) {
  33. !         execlp("gzip", "gzip", "-d", (char *)0);
  34. !         /* Try uncompress if gunzip fails */
  35.           execlp("compress", "compress", "-d", (char *)0);
  36. +     } else if (f_zip)
  37. +         execlp("gzip", "gzip", "-8", (char *)0);
  38.       else
  39.           execlp("compress", "compress", (char *)0);
  40.       msg_perror("can't exec compress");
  41. diff -c bak/tar.c ./tar.c
  42. *** bak/tar.c    Mon Sep 14 23:31:38 1992
  43. --- ./tar.c    Mon Dec 28 19:14:29 1992
  44. ***************
  45. *** 158,163 ****
  46. --- 158,164 ----
  47.       {"ignore-zeros",    0,    &f_ignorez,        1},
  48.       {"keep-old-files",    0,    0,            'k'},
  49.       {"uncompress",        0,    &f_compress,        1},
  50. +         {"unzip",        0,    0,            'z'},
  51.       {"same-permissions",    0,    &f_use_protection,    1},
  52.       {"preserve-permissions",0,    &f_use_protection,    1},
  53.       {"modification-time",    0,    &f_modified,        1},
  54. ***************
  55. *** 183,188 ****
  56. --- 184,190 ----
  57.       {"old-archive",        0,    0,            'o'},
  58.       {"portability",        0,    0,            'o'},
  59.       {"compress",        0,    &f_compress,        1},
  60. +         {"zip",            0,    0,            'z'},
  61.       {"compress-block",    0,    &f_compress,        2},
  62.       {"sparse",        0,    &f_sparse_files,    1},
  63.       {"tape-length",        1,    0,            'L'},
  64. ***************
  65. *** 609,615 ****
  66.               add_exclude_file(optarg);
  67.               break;
  68.   
  69. !         case 'z':        /* Easy to type */
  70.           case 'Z':        /* Like the filename extension .Z */
  71.               f_compress++;
  72.               break;
  73. --- 611,621 ----
  74.               add_exclude_file(optarg);
  75.               break;
  76.   
  77. !         case 'z':        /* Like the filename extension .z */
  78. !             f_zip++;
  79. !             f_compress++;
  80. !             break;
  81.           case 'Z':        /* Like the filename extension .Z */
  82.               f_compress++;
  83.               break;
  84. ***************
  85. *** 716,722 ****
  86.   -W, --verify        attempt to verify the archive after writing it\n\
  87.   --exclude FILE        exclude file FILE\n\
  88.   -X, --exclude-from FILE    exclude files listed in FILE\n\
  89. ! -z, -Z, --compress,\n\
  90.       --uncompress          filter the archive through compress\n\
  91.   -[0-7][lmh]        specify drive and density\n\
  92.   ", stdout);
  93. --- 722,729 ----
  94.   -W, --verify        attempt to verify the archive after writing it\n\
  95.   --exclude FILE        exclude file FILE\n\
  96.   -X, --exclude-from FILE    exclude files listed in FILE\n\
  97. ! -z, --zip, --unzip    filter the archive through gzip\n\
  98. ! -Z, --compress,\n\
  99.       --uncompress          filter the archive through compress\n\
  100.   -[0-7][lmh]        specify drive and density\n\
  101.   ", stdout);
  102. diff -c bak/tar.h ./tar.h
  103. *** bak/tar.h    Tue Sep  8 21:45:34 1992
  104. --- ./tar.h    Mon Dec 28 19:06:40 1992
  105. ***************
  106. *** 224,231 ****
  107.   TAR_EXTERN int  f_verify;        /* -W */
  108.               /* CMD_EXTRACT     -x */
  109.   TAR_EXTERN int  f_exclude;        /* -X */
  110. ! TAR_EXTERN int     f_compress;        /* -z */
  111. !                     /* -Z */
  112.   TAR_EXTERN int    f_do_chown;        /* --do-chown */
  113.   TAR_EXTERN int  f_totals;        /* --totals */
  114.   TAR_EXTERN int    f_remove_files;        /* --remove-files */
  115. --- 224,231 ----
  116.   TAR_EXTERN int  f_verify;        /* -W */
  117.               /* CMD_EXTRACT     -x */
  118.   TAR_EXTERN int  f_exclude;        /* -X */
  119. ! TAR_EXTERN int     f_zip;            /* -z */
  120. ! TAR_EXTERN int     f_compress;        /* -Z */
  121.   TAR_EXTERN int    f_do_chown;        /* --do-chown */
  122.   TAR_EXTERN int  f_totals;        /* --totals */
  123.   TAR_EXTERN int    f_remove_files;        /* --remove-files */
  124.